<#assign t=JspTaglibs["/META-INF/tld/tiles-jsp.tld"] />
<#assign s=JspTaglibs["/META-INF/tld/struts-tags.tld"] />
<@s.url value="" var="cntxpth"/>
<@s.set name="contextPath" value="#cntxpth"  />
<@s.set name="templateName" value="#templateName"/>
<@s.set name="resourcePath">/${contextPath}templates/${templateName}</@s.set>

<@s.form enctype="multipart/form-data" namespace="/contact" method="POST" action="saveContact">
<@s.div class="grid_4" id="form">

    <h2>Adding contact form</h2>
    <fieldset>

        <label>
            <@s.textfield name="contact.value" value="Contact value" onblur="if(this.value=='') this.value='Contact value'"
            onfocus="if(this.value == 'Contact value') this.value=''"/>
        </label>


        <label>
            <select name="contact.link" tabindex="0">
                <option>Contact link type...</option>
                <option value="mailto:{0}">E-mail</option>
                <option value="callto:{0}">Call</option>
                <optgroup label="Windows Live Messenger">
                    <option value="msnim:add?contact={0}">Add</option>
                    <option value="msnim:call?contact={0}">Call</option>
                    <option value="msnim:chat?contact={0}">Chat</option>
                    <option value="msnim:video?contact={0}">Video</option>
                </optgroup>
                <optgroup label="Skype">
                    <option value="skype:{0}?add">Add</option>
                    <option value="skype:{0}?call">Call</option>
                    <option value="skype:{0}?chat">Chat</option>
                    <option value="skype:{0}?voicemail">Voicemail</option>
                    <option value="skype:{0}?sendfile">Send file</option>
                    <option value="skype:{0}?userinfo">User info</option>
                </optgroup>
                <optgroup label="AOL Instant Messenger (AIM)">
                    <option value="aim:addbuddy?screenname={0}">Add</option>
                    <option value="aim:addbuddy?screenname={0}">Add to group</option>
                    <option value="aim:goim?screenname={0}">Chat</option>
                    <option value="aim:gochat?roomname={0}">Chatroom</option>
                    <option value="aim:getfile?screenname={0}">Send file</option>
                </optgroup>
                <optgroup label="ICQ">
                    <option value="http://www.icq.com/people/cmd.php?uin={0}&action=add">Add</option>
                    <option value="http://www.icq.com/people/cmd.php?uin={0}&action=message">Chat</option>
                    <option value="http://www.icq.com/people/{0}">User info</option>
                </optgroup>
                <optgroup label="Microsoft Office Live Meeting">
                    <option value="http://yourlivemeetingserver.com/meet/{0}">Meet</option>
                </optgroup>
                <optgroup label="Microsoft Office Communicator">
                    <option value="sip:{0}">Chat</option>
                    <option value="tel:{0}">Call</option>
                </optgroup>
                <optgroup label="Yahoo Messenger">
                    <option value="ymsgr:addfriend?{0}">Add</option>
                    <option value="ymsgr:call?{0}">Call</option>
                    <option value="ymsgr:callphone?{0}">Call phone</option>
                    <option value="ymsgr:sendim?{0}">Chat</option>
                </optgroup>
                <optgroup label="Google Talk">
                    <option value="gtalk:chat?jid={0}">Chat</option>
                    <option value="gtalk:call?jid={0}">Call</option>
                </optgroup>
            </select>
        </label>
        <label>
            Icon file according contact <@s.file name="upload" required='true'/>
        </label>

        <div class="btns">
            <button type="reset" style="border: none; background-color: transparent;">
                <a href="#" class="button">Clear</a>
            </button>
            <button type="submit" style="border: none; background-color: transparent;">
                <a href="#" class="button">Save</a>
            </button>
        </div>
    </fieldset>
</@s.div>
<@s.div class="clear"></@s.div>
</@s.form>

<#--    <#assign pleaseSelect = {"E-mail":"mailto:", "Call":"callto:"}>
        <@s.select label="Please select" name="contact.type"  >
        <#assign wlm = {'Add':'msnim:add?contact={0}','Call':'msnim:call?contact={0}','Chat':'msnim:chat?contact={0}','Video':'msnim:video?contact={0}'}>
        <@s.optgroup label="Windows Live Messenger" list="#wlm" />

        <#assign skype = {'Add':'skype:{0}?add','Call':'skype:{0}?call','Chat':'skype:{0}?chat','Voicemail':'skype:{0}?voicemail','Send file':'skype:{0}?sendfile','User info':'skype:{0}?userinfo'}>
        <@s.optgroup label="Skype" list="#skype" />

        <#assign aol = {'Add':'aim:addbuddy?screenname={0}','Add to group':'aim:addbuddy?screenname={0}','Chat':'aim:goim?screenname={0}','Chatroom':'aim:gochat?roomname={0}','Send file':'aim:getfile?screenname={0}'}>
        <@s.optgroup label="AOL Instant Messenger (AIM)" list="#aol"/>

        <#assign icq = {'Add':'http://www.icq.com/people/cmd.php?uin={0}&action=add','Chat':'http://www.icq.com/people/cmd.php?uin={0}&action=message','User info':'http://www.icq.com/people/{0}'}>
        <@s.optgroup label="ICQ" list="#icq"/>

        <#assign molm = {'Meet':'http://yourlivemeetingserver.com/meet/{0}'}>
        <@s.optgroup label="Microsoft Office Live Meeting" list="#molm"/>

        <#assign moc = {'Chat':'sip:{0}','Call':'tel:{0}'}>
        <@s.optgroup label="Microsoft Office Communicator" list="#moc"/>

        <#assign ym= {'Add':'ymsgr:addfriend?{0}','Call':'ymsgr:call?{0}','Call phone':'ymsgr:callphone?{0}', 'Chat':'ymsgr:sendim?{0}'}>
        <@s.optgroup label="Yahoo Messenger" list="#ym"/>

        <#assign googletalk = {'Chat':'gtalk:chat?jid={0}', 'Call':'gtalk:call?jid={0}'}>
        <@s.optgroup label="Google Talk" list="#googletalk"/>

    </@s.select>
    <@s.submit key="txt.submit"/>-->
